cmake_minimum_required(VERSION 3.0.2)
project(pcd2las_python)

## 查找catkin宏和库
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
)

################################################
## 声明ROS消息、服务和动作 ##
################################################

# 如果需要使用消息的生成，请添加以下内容
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )
# generate_messages(
#   DEPENDENCIES
#   std_msgs
# )

################################################
## 声明ROS动态重新配置参数 ##
################################################

# 如果需要动态重新配置，请添加以下内容
# generate_dynamic_reconfigure_options(
#   cfg/DynReconf1.cfg
#   cfg/DynReconf2.cfg
# )

###################################
## catkin特定配置 ##
###################################

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES pcd2las_python
#  CATKIN_DEPENDS roscpp rospy std_msgs
#  DEPENDS system_lib
)

###########
## 构建 ##
###########

include_directories(
  ${catkin_INCLUDE_DIRS}
)

## 可执行文件的声明
# add_executable(${PROJECT_NAME}_node src/pcd2las_python_node.cpp)
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES})

#############
## 安装 ##
#############

# 所有安装目标应使用catkin DESTINATION变量

## 标记可执行脚本（Python等）以便安装
# catkin_install_python(PROGRAMS
#   scripts/my_python_script
#   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## 标记可执行文件和库的安装
# install(TARGETS ${PROJECT_NAME}_node
#   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

# install(TARGETS ${PROJECT_NAME}
#   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
# )

## 标记cpp头文件以便安装
# install(DIRECTORY include/${PROJECT_NAME}/
#   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
#   FILES_MATCHING PATTERN "*.h"
#   PATTERN ".svn" EXCLUDE
# )

## 标记其他文件以便安装（例如launch和bag文件）
# install(FILES
#   # myfile1
#   # myfile2
#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )

#############
## 测试 ##
#############

# catkin_add_gtest(${PROJECT_NAME}-test test/test_pcd2las_python.cpp)
# if(TARGET ${PROJECT_NAME}-test)
#   target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()

# catkin_add_nosetests(test)

